<fieldset>
	<legend>Attribute editor</legend>
        <?php if(!isset($action))  $action = 'processdesigner/create_attribute'; ?>

	<?php echo form_open($action); ?>
		<ul>
			<li><p>
                                <?php echo form_error('name'); ?>
				<label for="name">Attribute name:</label><br />
				<input type="text" name="name" id="name" value="<?php echo $name; ?>" />
			</p></li>

			<li><p>
                                <?php echo form_error('description'); ?>
				<label for="description">Attribute description:</label><br />

				<textarea rows="10" cols="80" name="description" id="description"><?php echo $description; ?></textarea>
			</p></li>

			<li><p>
                                <?php echo form_error('attribute_type'); ?>
				<label for="attribute_type">Attribute type:</label><br />
				<select name="attribute_type" id="attribute_type">
					<option value="TEXT">text</option>
					<option value="PASSWORD">password</option>
					<option value="TEXTAREA">textarea</option>
					<option value="CHECKBOX">checkbox</option>
					<option value="FILE">file</option>
				</select>
			</p></li>

			<li><p>
                                <?php echo form_error('optional'); ?>
				<input type="checkbox" name="optional" id="optional" <?php echo $checked; ?> /> <label for="optional">Optional</label>

			</p></li>

			<li><p>
				<input type="submit" value="Save"/>
                                <?php if(!isset($location)) $location = 'home/main'; ?>
                                <input type="button" value="Cancel" onclick="javascript:document.location = '<?php echo site_url($location); ?>'" />
			</p></li>
		</ul>
	<?php echo form_close(); ?>
</fieldset>

